package com.zhentao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhentao.pojo.Dept;
import com.zhentao.service.DeptService;
import com.zhentao.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 86191
* @description 针对表【tb_dept】的数据库操作Service实现
* @createDate 2025-04-27 10:16:50
*/
@Service
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept>
    implements DeptService{
    @Autowired
    private DeptMapper deptMapper;
    @Override
    public int addNum(int did) {
        Dept dept = deptMapper.selectById(did);
        dept.setNum(dept.getNum()+1);
        return deptMapper.updateById(dept);
    }
}




